<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/fun.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/info.js" type="text/javascript" charset="utf-8"></script>
		<style>
			#loginResult{
				width: 30%;
				height: 300px;
				float: left;
				margin-right: 50px;
				border: seagreen solid 2px;
				overflow: auto;
			}
			#indexInfo{
				width: 60%;
				height: 300px;
				float: left;
				margin-right: 50px;
				border: seagreen solid 2px;
				overflow: auto;
			}
			#time{
				margin-left: 30px;
				color: red;
			}
		</style>
	</head>
	<body>
		<button type="button" id="login">老师登录</button>
		<button type="button" id="ripiyue">日报批阅</button>
		<button type="button" id="zhoupiyue">周报批阅</button>
		<button type="button" id="yuepiyue">月报批阅</button>
		<button type="button" id="yuepiyue" onclick="buqian()">补签</button>
		<span id="time">
			
		</span>
		<hr />
		<div id="loginResult"></div>
		<div id="indexInfo"></div>
		
	</body>
	<script>
		var index = 0;
		$(function() {
			$("#time").html(`本次审批时间：${new Date().toLocaleString( )}`);
			$("#login").click(() => {
				if (index < teaInfo.length) {
					login(teaInfo[index].tel, teaPwd, teaInfo[index].name);
					index++;
				}
			});
			$("#ripiyue").click(() => {
				$("#loginResult").append("开始批阅日报....<br/>")
				piyue2("day", 2);
				$("#loginResult").append("日报批阅结束<br/>")
				$("#zhoupiyue").click();
			});
			$("#zhoupiyue").click(() => {
				$("#loginResult").append("&emsp;开始批阅周报....<br/>")
				piyue2("week", 3);
				$("#loginResult").append("周报报批阅结束<br/>")
				$("#yuepiyue").click();
			});
			$("#yuepiyue").click(() => {
				$("#loginResult").append("&emsp;&emsp;开始批阅月报....<br/>")
				piyue2("month", 4);
				$("#loginResult").append("月报批阅结束<br/>");
				buqian();
				$("#loginResult").scrollTop(10000)
				$("#login").click()
			});
			$("#login").click()
			let time = (Math.floor(Math.random()*100)+900)*60*60*3;
			setTimeout("location.reload()",time)
		});
	</script>
</html>
